package com.guomao;

import java.util.Arrays;

public class JavaDemo14 {

    public static void main(String[] args) {

        int[] arr = {1, 3, 5, 7, 9};

        System.out.println("main start:" + Arrays.toString(arr));//13579
        oprateArray(arr);
        System.out.println("main end:" + Arrays.toString(arr));//1310079
    }

    //地址传递
    //引用类型当做参数传递 形参的改变会影响实参
    public static void oprateArray(int[] arr) {
        System.out.println("oprate start:" + Arrays.toString(arr));//13579
        arr[2] = 100;
        System.out.println("oprate end:" + Arrays.toString(arr));//1310079
    }
}
